class MyDes:
    def __init__(self, val1, val2):
        self.value1 = val1
        self.value2 = val2

    def __get__(self, obj, owner):
        print('正在获取变量：', self.value2)
        return self.value1

    def __set__(self, obj, value):
        print('正在修改变量：', self.value2)
        self.value1 = 8

    def __delete__(self, obj):
        print('正在删除变量：', self.value2)
        print('噢~这个变量没法删除~')


class Test:
    x = MyDes(10, 'x')


test = Test()
y = test.x
print(y)
test.x = 0
del test.x
print(test.x)
